<?php
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of NewsController
 *
 * @author Константин Охотник
 */

namespace Jacov\JacovBundle\Controller;

use Jacov\JacovBundle\Controller\MainController;
use Jacov\JacovBundle\Model\PagesModel;

class IndexController extends MainController
{  
    private $_PagesModel;
    public function indexAction()
    {
        return $this->render(
            'JacovJacovBundle:Content:index.html.twig'   
        );
    }
    
    public function PageSelectAction($page)
    {
        $this->_PagesModel = new PagesModel($this->getDoctrine()->getManager());
          return $this->render(
            'JacovJacovBundle:Content:page.html.twig',
            array('page'=>$this->_PagesModel->getPage($page))     
        );
    }
}